// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   Top10.java

package com.kaylyn.item;

import com.kaylyn.util.Initializable;
import com.kaylyn.util.Resource;
import java.awt.EventQueue;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

public class Top10 extends JLabel implements Initializable {

	public Top10() {
		setSize(840, 560);
		setLayout(null);
		setOpaque(true);
		background = new ImageIcon[10];
		labels = new JLabel[10];
		icon = new ImageIcon[10];
		icon_rollover = new ImageIcon[10];
		for (int i = 0; i < 10; i++) {
			background[i] = new ImageIcon(Resource.loadImage(img[i]));
			icon[i] = new ImageIcon(Resource.loadImage(img[i + 10]));
			icon_rollover[i] = new ImageIcon(Resource.loadImage(img[i + 20]));
			labels[i] = new JLabel(String.valueOf(i));
			labels[i].setIcon(icon[i]);
			labels[i].setSize(icon[i].getIconWidth(), icon[i].getIconHeight());
			final int j = i;
			labels[i].addMouseListener(new MouseAdapter() {

				public void mouseEntered(MouseEvent e) {
					EventQueue.invokeLater(new Runnable() {

						public void run() {
							setIcon(background[j]);
							labels[j].setIcon(icon_rollover[j]);
						}

					});
				}

				public void mouseExited(MouseEvent e) {
					EventQueue.invokeLater(new Runnable() {

						public void run() {
							labels[j].setIcon(icon[j]);
						}

					});
				}

			});
		}

		labels[0].setLocation(0, 50);
		labels[1].setLocation(30, 100);
		labels[2].setLocation(0, 150);
		labels[3].setLocation(30, 200);
		labels[4].setLocation(0, 250);
		labels[5].setLocation(30, 300);
		labels[6].setLocation(0, 350);
		labels[7].setLocation(30, 400);
		labels[8].setLocation(0, 450);
		labels[9].setLocation(30, 500);
		title = new JLabel();
		title.setSize(618, 87);
		title.setLocation(getWidth() - title.getWidth(), 0);
		
		for (int i = 0; i < 10; i++)
			add(labels[i]);

		title.setIcon(new ImageIcon(Resource
				.loadImage("toptentitle.png")));
		add(title);
		setIcon(background[0]);
		
	}

	public void start() {

	}

	public void stop() {
	}

	private static final long serialVersionUID = 1L;
	private String img[] = { "0212176.jpg", "2129.jpg", "2097.jpg", "2085.jpg",
			"1711.jpg", "1194.jpg", "00738.jpg", "040.jpg", "010.jpg",
			"006.jpg", "icon01.png", "icon02.png", "icon03.png", "icon04.png",
			"icon05.png", "icon06.png", "icon07.png", "icon08.png",
			"icon09.png", "icon10.png", "icon01_rollover.png",
			"icon02_rollover.png", "icon03_rollover.png",
			"icon04_rollover.png", "icon05_rollover.png",
			"icon06_rollover.png", "icon07_rollover.png",
			"icon08_rollover.png", "icon09_rollover.png", "icon10_rollover.png" };
	private ImageIcon background[];
	private ImageIcon icon[];
	private ImageIcon icon_rollover[];
	private JLabel labels[];
	private JLabel title;

}
